package a.b;

import java.util.Iterator;

final class i
{
  static g a()
  {
    return new a_();
  }
  
  static g c()
  {
    return new b_();
  }
  
  private static final class a_
    extends i.c_
  {
    boolean[] e = null;
    double[] f = null;
    
    public void a()
    {
      boolean bool = d.o;
      int k = d.n;
      this.b = true;
      if (!bool)
      {
        if (this.a.isEmpty()) {
          return;
        }
        this.e = new boolean[this.a.size()];
        this.f = new double[this.a.size()];
      }
      double d = c();
      int i = 0;
      int j = this.a.size();
      do
      {
        if (i >= j) {
          break;
        }
        c localc = (c)this.a.get(i);
        localc.a();
        this.e[i] = false;
        this.f[i] = ((bool) || (0.0D < d) ? localc.c() / d : 0.0D);
        i++;
      } while (k == 0);
    }
    
    public void a(double paramDouble)
    {
      boolean bool = d.o;
      int k = d.n;
      if (!bool) {
        if (this.a.isEmpty()) {
          return;
        }
      }
      int i = 0;
      int j = this.a.size();
      if (i < j) {
        if (!bool) {
          if (paramDouble <= this.f[i])
          {
            d = (bool) || (0.0D < this.f[i]) ? paramDouble / this.f[i] : 1.0D;
            if (!bool) {
              if (1.0D < d)
              {
                d = 1.0D;
                if (bool) {
                  break label157;
                }
                if (k == 0) {
                  break label133;
                }
              }
            }
            if (!bool)
            {
              if (0.0D > d) {
                d = 0.0D;
              }
              label133:
              ((c)this.a.get(i)).a(d);
            }
            label157:
            if (bool) {
              break label227;
            }
            if (1.0D != d) {
              break label222;
            }
            this.e[i] = true;
            if (bool) {
              break label227;
            }
            if (k == 0) {
              break label222;
            }
          }
        }
      }
      label222:
      label227:
      while (bool)
      {
        double d;
        if (!bool)
        {
          if (this.e[i] == 0)
          {
            ((c)this.a.get(i)).a(1.0D);
            this.e[i] = true;
          }
          i++;
        }
        if (k == 0) {
          break;
        }
      }
    }
  }
  
  private static final class b_
    extends i.c_
  {
    public void a()
    {
      boolean bool = d.o;
      int i = d.n;
      this.b = true;
      if (!bool) {
        if (this.a.isEmpty()) {
          return;
        }
      }
      do
      {
        Iterator localIterator = this.a.iterator();
        while (i == 0)
        {
          if (!localIterator.hasNext()) {
            break;
          }
          ((c)localIterator.next()).a();
        }
      } while (bool);
    }
    
    public void a(double paramDouble)
    {
      boolean bool = d.o;
      int i = d.n;
      if (!bool) {
        if (this.a.isEmpty()) {
          return;
        }
      }
      do
      {
        Iterator localIterator = this.a.iterator();
        while (i == 0)
        {
          if (!localIterator.hasNext()) {
            break;
          }
          ((c)localIterator.next()).a(paramDouble);
        }
      } while (bool);
    }
  }
  
  private static abstract class c_
    extends e
  {
    long d = 0L;
    
    public void b()
    {
      boolean bool = d.o;
      int j = d.n;
      if (!bool) {
        if (this.a.isEmpty())
        {
          this.b = false;
          return;
        }
      }
      int i = this.a.size() - 1;
      if (i > -1) {}
      while (bool)
      {
        ((c)this.a.get(i)).b();
        i--;
        if ((!bool) && (j != 0)) {
          return;
        }
        if (j == 0) {
          break;
        }
      }
      this.b = false;
    }
    
    public long c()
    {
      boolean bool = d.o;
      int i = d.n;
      if (!bool) {
        if (this.c)
        {
          this.d = 0L;
          Iterator localIterator = this.a.iterator();
          do
          {
            do
            {
              c localc;
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localc = (c)localIterator.next();
              } while (localc.c() <= this.d);
              if (bool) {
                break label108;
              }
              this.d = localc.c();
              if ((bool) || (i != 0)) {
                break label107;
              }
            } while (bool);
          } while (i == 0);
          this.c = false;
        }
      }
      label107:
      label108:
      return this.d;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.b.i

 * JD-Core Version:    0.7.0.1

 */